Integrand size = 23, antiderivative size = 196 \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\frac {2 \sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}-\frac {9 \sqrt {a} \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a+a \sec (c+d x)}}\right )}{8 \sqrt {2} d}+\frac {7 \cot (c+d x) \sqrt {a+a \sec (c+d x)}}{8 d}+\frac {\cot ^3(c+d x) (a+a \sec (c+d x))^{3/2}}{12 a d}-\frac {\cos (c+d x) \cot ^3(c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right ) (a+a \sec (c+d x))^{3/2}}{4 a d} \]
1/12*cot(d*x+c)^3*(a+a*sec(d*x+c))^(3/2)/a/d-1/4*cos(d*x+c)*cot(d*x+c)^3*s ec(1/2*d*x+1/2*c)^2*(a+a*sec(d*x+c))^(3/2)/a/d+2*arctan(a^(1/2)*tan(d*x+c) /(a+a*sec(d*x+c))^(1/2))*a^(1/2)/d-9/16*arctan(1/2*a^(1/2)*tan(d*x+c)*2^(1 /2)/(a+a*sec(d*x+c))^(1/2))*a^(1/2)/d*2^(1/2)+7/8*cot(d*x+c)*(a+a*sec(d*x+ c))^(1/2)/d
Time = 7.21 (sec) , antiderivative size = 232, normalized size of antiderivative = 1.18 \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\frac {\left (-9 \arcsin \left (\tan \left (\frac {1}{2} (c+d x)\right )\right )+16 \sqrt {2} \arctan \left (\frac {\tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}}}\right )\right ) \sqrt {\frac {\cos (c+d x)}{1+\cos (c+d x)}} \sqrt {\sec ^2\left (\frac {1}{2} (c+d x)\right )} \sqrt {1+\sec (c+d x)} \sqrt {a (1+\sec (c+d x))}}{16 d \sqrt {\sec (c+d x)}}+\frac {\sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sec (c+d x))} \left (\frac {2}{3} \csc \left (\frac {1}{2} (c+d x)\right )-\frac {1}{24} \csc ^3\left (\frac {1}{2} (c+d x)\right )-\frac {31}{24} \sin \left (\frac {1}{2} (c+d x)\right )+\frac {1}{16} \sec \left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {1}{2} (c+d x)\right )\right )}{d} \]
((-9*ArcSin[Tan[(c + d*x)/2]] + 16*Sqrt[2]*ArcTan[Tan[(c + d*x)/2]/Sqrt[Co s[c + d*x]/(1 + Cos[c + d*x])]])*Sqrt[Cos[c + d*x]/(1 + Cos[c + d*x])]*Sqr t[Sec[(c + d*x)/2]^2]*Sqrt[1 + Sec[c + d*x]]*Sqrt[a*(1 + Sec[c + d*x])])/( 16*d*Sqrt[Sec[c + d*x]]) + (Sec[(c + d*x)/2]*Sqrt[a*(1 + Sec[c + d*x])]*(( 2*Csc[(c + d*x)/2])/3 - Csc[(c + d*x)/2]^3/24 - (31*Sin[(c + d*x)/2])/24 + (Sec[(c + d*x)/2]*Tan[(c + d*x)/2])/16))/d
Time = 0.35 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.05, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.478, Rules used = {3042, 4375, 374, 25, 27, 445, 27, 445, 27, 397, 216}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cot ^4(c+d x) \sqrt {a \sec (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {a \csc \left (c+d x+\frac {\pi }{2}\right )+a}}{\cot \left (c+d x+\frac {\pi }{2}\right )^4}dx\) |
\(\Big \downarrow \) 4375 |
\(\displaystyle -\frac {2 \int \frac {\cot ^4(c+d x) (\sec (c+d x) a+a)^2}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )^2}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{a d}\) |
\(\Big \downarrow \) 374 |
\(\displaystyle -\frac {2 \left (\frac {\int -\frac {a \cot ^4(c+d x) (\sec (c+d x) a+a)^2 \left (\frac {5 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{4 a}+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {2 \left (\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}-\frac {\int \frac {a \cot ^4(c+d x) (\sec (c+d x) a+a)^2 \left (\frac {5 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )}{4 a}\right )}{a d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {2 \left (\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}-\frac {1}{4} \int \frac {\cot ^4(c+d x) (\sec (c+d x) a+a)^2 \left (\frac {5 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )}{a d}\) |
\(\Big \downarrow \) 445 |
\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (\frac {1}{6} \int -\frac {3 a \cot ^2(c+d x) (\sec (c+d x) a+a) \left (7-\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \int \frac {\cot ^2(c+d x) (\sec (c+d x) a+a) \left (7-\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\) |
\(\Big \downarrow \) 445 |
\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} \int \frac {a \left (\frac {7 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+23\right )}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} a \int \frac {\frac {7 a \tan ^2(c+d x)}{\sec (c+d x) a+a}+23}{\left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1\right ) \left (\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2\right )}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} a \left (16 \int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+1}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )-9 \int \frac {1}{\frac {a \tan ^2(c+d x)}{\sec (c+d x) a+a}+2}d\left (-\frac {\tan (c+d x)}{\sqrt {\sec (c+d x) a+a}}\right )\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle -\frac {2 \left (\frac {1}{4} \left (-\frac {1}{2} a \left (\frac {7}{2} \cot (c+d x) \sqrt {a \sec (c+d x)+a}-\frac {1}{2} a \left (\frac {9 \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {2} \sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {2} \sqrt {a}}-\frac {16 \arctan \left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{\sqrt {a}}\right )\right )-\frac {1}{6} \cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}\right )+\frac {\cot ^3(c+d x) (a \sec (c+d x)+a)^{3/2}}{4 \left (\frac {a \tan ^2(c+d x)}{a \sec (c+d x)+a}+2\right )}\right )}{a d}\) |
(-2*((-1/6*(Cot[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2)) - (a*(-1/2*(a*((-16 *ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/Sqrt[a] + (9*Arc Tan[(Sqrt[a]*Tan[c + d*x])/(Sqrt[2]*Sqrt[a + a*Sec[c + d*x]])])/(Sqrt[2]*S qrt[a]))) + (7*Cot[c + d*x]*Sqrt[a + a*Sec[c + d*x]])/2))/2)/4 + (Cot[c + d*x]^3*(a + a*Sec[c + d*x])^(3/2))/(4*(2 + (a*Tan[c + d*x]^2)/(a + a*Sec[c + d*x])))))/(a*d)
3.2.45.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ ), x_Symbol] :> Simp[(-b)*(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(a*e*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) Int[(e*x)^m*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[b*c*(m + 1) + 2*(b*c - a*d)*(p + 1) + d*b*(m + 2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_ .)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(a*c*g*(m + 1))), x] + Simp[1/(a*c*g^2*(m + 1)) Int[(g*x)^(m + 2)*(a + b*x^2)^p*(c + d*x^2)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + 2 + 1) - e*2*(b*c*p + a*d*q) - b*e*d*(m + 2*(p + q + 2) + 1)*x^ 2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && LtQ[m, -1]
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _.), x_Symbol] :> Simp[-2*(a^(m/2 + n + 1/2)/d) Subst[Int[x^m*((2 + a*x^2 )^(m/2 + n - 1/2)/(1 + a*x^2)), x], x, Cot[c + d*x]/Sqrt[a + b*Csc[c + d*x] ]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && IntegerQ[m/2] && I ntegerQ[n - 1/2]
Time = 2.78 (sec) , antiderivative size = 196, normalized size of antiderivative = 1.00
method | result | size |
default | \(\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \left (-27 \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )+\sqrt {\cot \left (d x +c \right )^{2}-2 \cot \left (d x +c \right ) \csc \left (d x +c \right )+\csc \left (d x +c \right )^{2}-1}\right ) \sqrt {2}\, \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}+96 \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {arctanh}\left (\frac {\sin \left (d x +c \right )}{\left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}}\right )-62 \cot \left (d x +c \right )^{3}+4 \cot \left (d x +c \right )^{2} \csc \left (d x +c \right )+42 \cot \left (d x +c \right ) \csc \left (d x +c \right )^{2}\right )}{48 d}\) | \(196\) |
1/48/d*(a*(1+sec(d*x+c)))^(1/2)*(-27*ln(csc(d*x+c)-cot(d*x+c)+(cot(d*x+c)^ 2-2*cot(d*x+c)*csc(d*x+c)+csc(d*x+c)^2-1)^(1/2))*2^(1/2)*(-cos(d*x+c)/(cos (d*x+c)+1))^(1/2)+96*(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*arctanh(sin(d*x+c) /(cos(d*x+c)+1)/(-cos(d*x+c)/(cos(d*x+c)+1))^(1/2))-62*cot(d*x+c)^3+4*cot( d*x+c)^2*csc(d*x+c)+42*cot(d*x+c)*csc(d*x+c)^2)
Time = 0.41 (sec) , antiderivative size = 547, normalized size of antiderivative = 2.79 \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\left [\frac {27 \, {\left (\sqrt {2} \cos \left (d x + c\right )^{2} - \sqrt {2}\right )} \sqrt {-a} \log \left (\frac {2 \, \sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right )^{2} + 2 \, a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) \sin \left (d x + c\right ) + 48 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sqrt {-a} \log \left (-\frac {8 \, a \cos \left (d x + c\right )^{3} - 4 \, {\left (2 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right )\right )} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right ) + 1}\right ) \sin \left (d x + c\right ) + 4 \, {\left (31 \, \cos \left (d x + c\right )^{3} - 2 \, \cos \left (d x + c\right )^{2} - 21 \, \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{96 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )}, \frac {48 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sqrt {a} \arctan \left (\frac {2 \, \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right )}{2 \, a \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right ) - a}\right ) \sin \left (d x + c\right ) + 27 \, {\left (\sqrt {2} \cos \left (d x + c\right )^{2} - \sqrt {2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) \sin \left (d x + c\right ) + 2 \, {\left (31 \, \cos \left (d x + c\right )^{3} - 2 \, \cos \left (d x + c\right )^{2} - 21 \, \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{48 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )}\right ] \]
[1/96*(27*(sqrt(2)*cos(d*x + c)^2 - sqrt(2))*sqrt(-a)*log((2*sqrt(2)*sqrt( -a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c) + 3* a*cos(d*x + c)^2 + 2*a*cos(d*x + c) - a)/(cos(d*x + c)^2 + 2*cos(d*x + c) + 1))*sin(d*x + c) + 48*(cos(d*x + c)^2 - 1)*sqrt(-a)*log(-(8*a*cos(d*x + c)^3 - 4*(2*cos(d*x + c)^2 - cos(d*x + c))*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c) - 7*a*cos(d*x + c) + a)/(cos(d*x + c) + 1)) *sin(d*x + c) + 4*(31*cos(d*x + c)^3 - 2*cos(d*x + c)^2 - 21*cos(d*x + c)) *sqrt((a*cos(d*x + c) + a)/cos(d*x + c)))/((d*cos(d*x + c)^2 - d)*sin(d*x + c)), 1/48*(48*(cos(d*x + c)^2 - 1)*sqrt(a)*arctan(2*sqrt(a)*sqrt((a*cos( d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c)/(2*a*cos(d*x + c)^2 + a*cos(d*x + c) - a))*sin(d*x + c) + 27*(sqrt(2)*cos(d*x + c)^2 - sqrt(2) )*sqrt(a)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqrt(a)*sin(d*x + c)))*sin(d*x + c) + 2*(31*cos(d*x + c)^3 - 2*cos(d* x + c)^2 - 21*cos(d*x + c))*sqrt((a*cos(d*x + c) + a)/cos(d*x + c)))/((d*c os(d*x + c)^2 - d)*sin(d*x + c))]
\[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \cot ^{4}{\left (c + d x \right )}\, dx \]
\[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\int { \sqrt {a \sec \left (d x + c\right ) + a} \cot \left (d x + c\right )^{4} \,d x } \]
\[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\int { \sqrt {a \sec \left (d x + c\right ) + a} \cot \left (d x + c\right )^{4} \,d x } \]
Timed out. \[ \int \cot ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx=\int {\mathrm {cot}\left (c+d\,x\right )}^4\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}} \,d x \]